/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.greencat.gwt.comet.client.impl;

import com.greencat.gwt.comet.client.CometClient;
import com.greencat.gwt.comet.client.CometListener;

/**
 *
 * @author p.havelaar
 */
public class IECometTransport implements CometTransport {

    CometTransport transport;

    public IECometTransport() {
        if (XDomainRequest.isSupported()) {
            transport = new IEXDomainRequestCometTransport();
        } else {
            transport = new IEHTMLFileCometTransport();
        }
    }

    @Override
    public void connect(int connectionCount) {
        transport.connect(connectionCount);
    }

    @Override
    public void disconnect() {
        transport.disconnect();
    }

    @Override
    public void initiate(CometClient client, CometListener listener) {
        transport.initiate(client, listener);
    }
    
}
